'''
Created on 17 Mar 2011

@author: me
'''
import unittest, os
from data.DbInterface import DbInterface
from google.appengine.ext import db

class Test(unittest.TestCase):

    def setUp(self):
        os.environ['APPLICATION_ID'] = 'myapp'
        datastore_file = '/dev/null'
        from google.appengine.api import apiproxy_stub_map,datastore_file_stub
        apiproxy_stub_map.apiproxy = apiproxy_stub_map.APIProxyStubMap()
        stub = datastore_file_stub.DatastoreFileStub('myapp', datastore_file, '/')
        apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3', stub)
        
        DbInterface.testPop()

    def tearDown(self):
        tours = db.GqlQuery("SELECT * FROM Tour")
        db.delete(tours)
        stops = db.GqlQuery("SELECT * FROM Stop")
        db.delete(stops)

    def testName(self):
        pass


if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()